﻿
@{ IList<FCDB.Web.Models.ActivityEntityModel> modelList = (IList<FCDB.Web.Models.ActivityEntityModel>)ViewBag.ActivityCheckLogs;
 
    <tr style="height: 28px; width: 40px; ">
        <th  style="text-align: center; font-weight: bold;width:25%">流程步骤</th>
        <th  style="text-align: center; font-weight: bold">流程步骤p</th>
    </tr>
 
    foreach (FCDB.Web.Models.ActivityEntityModel item in modelList)
    {
        if (item.CheckState != 0)
        {
            if (item.FormCheckLogList.Count == 1){
                <tr style="height: 28px; width: 40px;@(item == modelList[modelList.Count - 1] ? "display:none" : "")">
                    @if (string.IsNullOrEmpty(item.FromDiv))
                    {             
                        <td>@item.ActivityName</td>
                        <td>
                            @(item.CheckState == 1 ? "同意": "不同意" )<span> @item.CheckContent</span>
                            <br />
                            <span style="width: 100%; text-align: right;">
                                @item.CheckUserName &nbsp;&nbsp;&nbsp;@item.CheckTime
                            </span>
                        </td>  
                    }
                    else
                    {
                        string FromDiv = "div" + item.FromDiv;
                        <td colspan="2"  style="  padding:0px; ">
                            <div id="@FromDiv" class="ProccessActiveContainer">
                                <input type="hidden" name="@(FromDiv + "CheckState")" id="@(FromDiv + "CheckState")" value="@item.CheckState" />
                                <input type="hidden" name="@(FromDiv + "CheckContent")" id="@(FromDiv + "CheckContent")" value="@item.CheckContent" />
                            </div>
                        </td>
                    } 
                </tr>
}else
{
                <tr style="width: 40px; @(item == modelList[modelList.Count - 1] ? "display:none" : "")">
                         <td>@item.ActivityName</td>
                         <td>
                             <table>
                                  @foreach(var m in item.FormCheckLogList)
                                  {
                                      <tr style="height: 28px;">
                                          <td>
                                              @(m.CheckState == 1 ? "同意" : "不同意")<span> @m.CheckContent</span>
                                              <br />
                                              <span style="width: 100%; text-align: right;">
                                                  @m.CheckUserName &nbsp;&nbsp;&nbsp;@m.CheckTime
                                              </span>
                                          </td>
                                      </tr>
                                  }
                             </table>
                         </td>
                     </tr>
            }
        }
        else
        {
    <tr style="height: 28px; width: 40px; @(item == modelList[modelList.Count - 1] ? "display:none" : "")">
        @if (string.IsNullOrEmpty(item.FromDiv))
        {
            <td>@item.ActivityName</td>
            <td></td>
        }
        else
        {
            string FromDiv = "div" + item.FromDiv;
            <td colspan="2"  style="  padding:0px; ">
                <div id="@FromDiv" class="ProccessActiveContainer"></div>
            </td>
            
        }
    </tr>
  
        }

    }
}
